include_directories(${CMAKE_SOURCE_DIR}/src/xplatform)

file (GLOB_RECURSE SERVER_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
include_directories(.)

find_package(uchardet REQUIRED)

add_executable(config_server ${SERVER_SRC_FILES})
include_directories(${CMAKE_SOURCE_DIR}/src/tool)
target_link_libraries(config_server PRIVATE xplatform protobuf protoc lxmysql uchardet)
target_link_libraries(config_server PRIVATE tool register_client)
if(WIN32)
  target_link_libraries(config_server PRIVATE ws2_32)
endif()
set_out_path(config_server)
set_runtime_name(config_server)